package com.lmk.t02;

import java.util.Scanner;

public class Text {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        System.out.println("欢迎来到汽车租赁");
        System.out.println("请选择租赁的车1.轿车  2.巴士");
        int choose=sc.nextInt();
        switch (choose){
            case 1:
                System.out.println("请选择汽车品牌1.比克商务舱2.宝马 3.别克林荫大道");
                choose=sc.nextInt();
                switch (choose){
                    case 1:
                        Car b=new Car("京.12484","别克","商务车GL8");
                        System.out.println("请选择租赁天数");
                        int days=sc.nextInt();
                        b.CalcRent(days);
                        System.out.println("一共花费"+b.CalcRent(days));
                        b.show();
                        break;
                    case 2:
                        Car c=new Car("京.123456","宝马","550i");
                        System.out.println("请选择租赁时间");
                        int day=sc.nextInt();
                        c.CalcRent(day);
                        System.out.println("一共花费"+c.CalcRent(day));
                        c.show();
                        break;
                    case 3:
                        Car d=new Car("京.1248445","别克","林荫大道");
                        System.out.println("请选择租赁时间");
                        int Days=sc.nextInt();
                        d.CalcRent(Days);
                        System.out.println("一共花费"+d.CalcRent(Days));
                        d.show();
                        break;

                }
                break;
            case 2:System.out.println("请选择巴士的座位数：1.小于等于16座 2.大于16座");
                choose =sc.nextInt();
                if (choose==1) {
                    Bus b=new Bus("鄂.123456","金杯",12);
                    System.out.println("请选择租赁时间");
                    int days=sc.nextInt();
                    b.CalcRent(days);
                    System.out.println("一共花费"+b.CalcRent(days));
                    b.show();
                }else if (choose==2) {
                    Bus b=new Bus("鄂.123456","金龙",24);
                    System.out.println("请选择租赁时间");
                    int days=sc.nextInt();
                    b.CalcRent(days);
                    System.out.println("一共花费"+b.CalcRent(days));
                    b.show();
                }
                break;


        }
    }
}
